<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script>

  var length = 10;

  function fn() {
    console.log(this.length);
  }

  var obj = {
    length: 5,
    method: function (fn) {
      fn();//10
      arguments[0]();//2
    }
  }
  obj.method(fn, 1)
</script>
</body>
</html>